#include "dig.hh"
#include <fstream>
#include <iostream>
#include <vector>

int main()
{
    std::cout << "Read plans" << std::endl;

    std::vector<DigPlan> digPlans {};
    std::ifstream infile {"./src/day18/input.txt"};
    std::string line {};
    while (std::getline(infile, line))
        digPlans.emplace_back(line);

    std::cout << "Dig doundary" << std::endl;
    auto feild {digBoundary(digPlans)};
    // printField(feild);

    std::cout << "Dig interior" << std::endl;
    digInterior(feild);
    printField(feild);

    std::cout << "Lava size" << std::endl;
    std::cout << lavaSize(feild) << std::endl;

    return 0;
}